import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/scrollreveal" //路由重定向
  },
  {
    path: "/scrollreveal",
    name: "scrollreveal",
    component: () => import("../views/scrollreveal.vue")
  },
  {
    path: "/earth",
    name: "earth",
    component: () => import("../views/Earth.vue")
  },
  {
    path: "/wow",
    name: "wow",
    component: () => import("../views/wow.vue")
  },
];

const router = new VueRouter({
  mode: "hash",
  base: process.env.BASE_URL,
  routes
});

export default router;
